<!-- 创建活动选择创建类型页面 -->
<template>
	<view class="create-page">
		<view class="moment-save" v-if="stagingActivities.length>0" >
			<text>你有暂存活动，还未发布，是否去查看</text>
			<view class="" @click="handleEditStagingActivity(stagingActivities[0].activity_id)">
				立即查看
			</view>
		</view>
		<view class="special-group">
			<view class="group-share">
				<view class="group-share-img">
					<image :src="imglink + 'member/create-active_icon_group.png'" mode="aspectFill"></image>
					<view class="group-share-content">
						<view class="">团购拼单</view>
						<view class="">支持1个和多个项目拼团裂变</view>
					</view>
				</view>
				<view class="group-share-make" @click="handleNavigate('group_purchase')">
					马上制作
				</view>
			</view>
			<view class="group-share" style="margin-top: 20upx;">
				<view class="group-share-img">
					<image :src="imglink + 'member/create-active_icon_prefer.png'" mode="aspectFill"></image>
					<view class="group-share-content">
						<view class="">特价优惠</view>
						<view class="">支持1个和多个项目拼团裂变</view>
					</view>
				</view>
				<view class="group-share-make" @click="handleNavigate('special')">
					马上制作
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				imglink: this.$store.state.imgLink,
				store_id:0,
				stagingActivities:[],
			}
		},
		onLoad(options) {
			
			let store_id = parseInt(options.store_id,10);
			if(store_id>0){
				this.$store.commit('updateStoreId',store_id)
			}
			this.store_id = store_id
			
			this.type = 'group_purchase'
			if(options.type =='special'){
				this.type = 'special'
			}
			
		},
		onShow(){
			
		},
		methods:{
			
			// 获取当前暂存活动
			getStagingActivities(){
				
			},
			handleNavigate(type){
				uni.navigateTo({
					url:'/pages/activity/add?store_id='+ this.store_id + '&type=' + this.type
				})
			}
		}
	}
</script>

<style>
	page{
		background: #F3F3F4;
	}
	.create-page{
		width: 100%;
	}
	.moment-save{
		width: 100%;
		padding: 10upx 94upx;
		box-sizing: border-box;
		display: flex;
		background: #FFF7D8;
	}
	.moment-save>text{
		color: #666666;
		font-size: 24upx;
		margin-top: 4upx;
	}
	.moment-save>view{
		width: 128upx;
		line-height: 38upx;
		text-align: center;
		border: 2upx solid #FF8B46;
		color: #FF8B46;
		font-size: 24upx;
		margin-left: 20upx;
	}
	.special-group{
		width: 100%;
		padding: 0 30upx;
		box-sizing: border-box;
		margin-top: 20upx;
	}
	.group-share{
		width: 100%;
		padding: 46upx 20upx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		border-radius: 8upx;
		background: #FFFFFF;
	}
	.group-share-img{
		display: flex;
		justify-content: space-between;
	}
	.group-share-img>image{
		width: 80upx;
		height: 80upx;
		margin-right: 20upx;
	}
	.group-share-content>view:first-child{
		color: #333333;
		font-size: 34upx;
	}
	.group-share-content>view:last-child{
		color: #999999;
		font-size: 24upx;
		margin-top: 4upx;
	}
	.group-share-make{
		width: 180upx;
		height: 60upx;
		line-height: 60upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 4upx;
		box-shadow: 0 8upx 16upx 0 rgba(225, 49, 0, 0.23);
		color: #FFFFFF;
		font-size: 30upx;
		text-align: center;
	}
</style>

